package com.xiaobingby.test;

import com.alibaba.fastjson.JSONObject;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import tdh.zfpt.util.CommonUtils;


/**
 * @author 李磊
 * @date 2021/7/15 16:01
 */
public class XmlProcessor extends BaseProcessor {
    @Override
    public void process(ParamDTO paramDTO) {
        Document document = DocumentHelper.createDocument();
        document.setXMLEncoding("utf-8");
        Element root = document.addElement("ROOT");

        JSONObject json = new JSONObject();
        json.put("案件信息","1");
        CommonUtils.json2Xml(root, json);

        paramDTO.setDocument(document);
        this.getNextProcessor().process(paramDTO);
    }
}
